<h1>Emergency contact List</h1>

<table class='sortable' id='sortable'>
  <thead>
    <tr>
      <th>Id</th>
      <th>Name</th>
      <th>Relationship type</th>
      <th>Phone</th>
      <th>Passenger</th>
      <th>Created at</th>
      <th>Updated at</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($emergency_contact_list as $emergency_contact): ?>
    <tr>
      <td><a href="<?php echo url_for('emergency_contact/show?id='.$emergency_contact['id']) ?>"><?php echo $emergency_contact->getid() ?></a></td>
      <td><?php echo $emergency_contact->getname() ?></td>
      <td><?php echo $emergency_contact->getrelationship_type_id() ?></td>
      <td><?php echo $emergency_contact->getphone() ?></td>
      <td><?php echo $emergency_contact->getpassenger_id() ?></td>
      <td><?php echo $emergency_contact->getcreated_at() ?></td>
      <td><?php echo $emergency_contact->getupdated_at() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

  <a href="<?php echo url_for('emergency_contact/new') ?>">New</a>
